import { Controller, Get, Inject } from '@nestjs/common';
import { AppService } from './app.service';
import { Logger } from 'winston';

@Controller()
export class AppController {
  constructor(
    @Inject('WINSTON_LOGGER') private logger: Logger,
    private readonly appService: AppService,
  ) {}

  @Get()
  getHello(): string {
    // 测试打印日志
    this.logger.info('Hello, World!');
    return this.appService.getHello();
  }
}
